<?php
/**
 * Created by JetBrains PhpStorm.
 * User: vander
 * Date: 5/28/13
 * Time: 9:10 PM
 * To change this template use File | Settings | File Templates.
 */
header('Access-Control-Allow-Origin: *');

$bookId = $_GET['bookId'];

$resArray = glob($bookId."/resources/*.*");

$info = new stdClass();
$info->definition = $bookId."/".$bookId.".json";
$info->resources = $resArray;

echo json_encode($info);

?>